package com.gopay.common.domain.ic;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

import com.gopay.common.domain.BaseEntity;

/** 
 * @ClassName: IcSuccessOrderDtl 
 * @Description: 账目不平的订单信息 
 * @author liuyu 
 * @date 2016年12月22日 上午9:59:29  
 */
@Entity
@Table(name = "IC_SUCCESS_ORDER_DTL")
public class IcSuccessOrderDtl extends BaseEntity {

    private static final long serialVersionUID = 1L;

    private Long id;// ID
    private String transType;//交易类型
    private String diffType;//差错类型
    private BigDecimal settleAmt;//结算金额
    private BigDecimal transAmt;//交易金额
    private BigDecimal fee;//手续费
    private String gopayOrderId;//国付宝订单号
    private String merOrderId;//客户订单号
    private String checkDate;//对账日期
    private Date createdTs;//创建日期
    private Date lastUpdTs;//最后修改日期
    private Long version;//乐观锁版本号

    @Id
    @SequenceGenerator(name = "IC_SUCCESS_ORDER_DTL_GENERATOR", sequenceName = "IC_SUCCESS_ORDER_DTL_SEQ", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "IC_SUCCESS_ORDER_DTL_GENERATOR")
    @Column(name = "ID")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "TRANS_TYPE", length = 6)
    public String getTransType() {
        return transType;
    }

    public void setTransType(String transType) {
        this.transType = transType;
    }
    
    @Column(name = "DIFF_TYPE", length = 6)
    public String getDiffType() {
        return diffType;
    }
    
    public void setDiffType(String diffType) {
        this.diffType = diffType;
    }

    @Column(name = "SETTLE_AMT", precision = 20, scale = 2)
    public BigDecimal getSettleAmt() {
        return settleAmt;
    }

    public void setSettleAmt(BigDecimal settleAmt) {
        this.settleAmt = settleAmt;
    }

    @Column(name = "TRANS_AMT", precision = 20, scale = 2)
    public BigDecimal getTransAmt() {
        return transAmt;
    }

    public void setTransAmt(BigDecimal transAmt) {
        this.transAmt = transAmt;
    }

    @Column(name = "FEE", precision = 20, scale = 2)
    public BigDecimal getFee() {
        return fee;
    }

    public void setFee(BigDecimal fee) {
        this.fee = fee;
    }

    @Column(name = "GOPAY_ORDER_ID", length = 30)
    public String getGopayOrderId() {
        return gopayOrderId;
    }

    public void setGopayOrderId(String gopayOrderId) {
        this.gopayOrderId = gopayOrderId;
    }

    @Column(name = "MER_ORDER_ID")
    public String getMerOrderId() {
        return merOrderId;
    }

    public void setMerOrderId(String merOrderId) {
        this.merOrderId = merOrderId;
    }

    @Column(name = "CHECK_DATE", nullable = false, unique = true, length = 8)
    public String getCheckDate() {
        return checkDate;
    }

    public void setCheckDate(String checkDate) {
        this.checkDate = checkDate;
    }

    @Column(name = "CREATED_TS", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }
    
    @Column(name = "LAST_UPD_TS")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastUpdTs() {
        return lastUpdTs;
    }
    
    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

    @Version
    @Column(name = "VERSION")
    public Long getVersion() {
        return version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }
    
    
}
